<?

#####################################################
#  COPYRIGHT NOTICE
#####################################################
# In the following statements, the term "this 
# program" refers to all files associated with the
# execution and distribution of Adtrackz.
#
# This Program is Copyright 2004 Jonah Klimack.
# All Rights Reserved. 
#
# Selling the code for this program, modifying 
# and/or redistributing the code for this program
# in part or in whole over the Internet or in any 
# other medium is expressly forbidden. Violators
# will be prosecuted to the fullest extent of the law
# Copyright and header information may not be
# modified.
#
# This program is distributed "as is" and without 
# warranty of any kind, either express or implied.
# In no event shall the liability of Jonah Klimack 
# for any damages, losses and/or causes of 
# action exceed the total amount paid by the 
# user for this software.		
#####################################################
# DO NOT MODIFY ANYTHING IN THIS FILE
#####################################################
header('P3P: CP="NOI DSP COR NID CUR OUR NOR"');

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> AdTrackzGold - Industry Leading Ad Tracker </TITLE>
<LINK href="styles.css" type=text/css rel=stylesheet>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></HEAD>
<BODY topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="white" background="background.jpg">
<!--header-->
<table width="640" border=0 align="center" cellpadding=0 cellspacing=0>
  <tr>
    
    <td align=center valign=middle height=20><img src="header.jpg" width="640" height="125"></td>
  </tr>
  <tr> 
   
    <td align=center valign=middle height=20> <script src="menu.js"></script> 
      <script menumaker src="buttons.js"></script> </td>
  </tr>
</table>

<!--body content-->
<table class="tborder" align="center" width="640" cellpadding="15" bgcolor="#FFFFFF">
<tr>
	<td valign="top">

		<?
		require "config.php";
		list ($mysql_username, $mysql_password) = mysql_fetch_row(mysql_query("select username,password from adtrackz_login"));
		list ($cuser, $cpass) = explode ("|", $_COOKIE['adtrackz']);

		if (!$_COOKIE['adtrackz']) //if no cookie
		{
			if ($username && $password) //if username exists, came from login page
			{
				if ($username != $mysql_username || $password != $mysql_password)
				{
					alert("<p class=alert> Username/Password incorrect. Click <a href=http://$domain/$udirectory/login.php>here</a> to login.");
					require "footer.php";
					exit;
				}
			}
			else //else, not logged in
			{
				alert("You are not logged in! Click <a href=http://$domain/$udirectory/login.php>here</a> to login. If the problem persists, make sure you have cookies turned on.");
				require "footer.php";
				exit;
			}
		}
		elseif ($cuser != $mysql_username || $cpass != $mysql_password)
		{
			alert("<p class=alert> Username/Password incorrect. Click <a href=http://$domain/$udirectory/login.php>here</a> to login.");
			require "footer.php";
			exit;
		}

		//START TIMER
		$benchstart = getmtime();
		?>

	